home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
NextDeveloper
/
Source
/
GNU
/
cc
/
rtf2asciiStream.c
< prev
next >
Wrap
Text File
|
1994-01-04
|
513b
|
22 lines
// rtf2asciiStream.c
#import "rtf2ascii.h"
NXStream * rtfToAsciiStream(NXStream * possiblyRichStream)
{
const char * rtfText = NULL;
int len, maxLen, asciiTextLen;
NXStream * asciiStream = NULL;
NXGetMemoryBuffer( possiblyRichStream, &rtfText, &len, &maxLen );
if (isRTFText(rtfText, len)) {
const char * asciiText = rtfToAscii(rtfText, len, &asciiTextLen);
if (asciiText) {
asciiStream = NXOpenMemory(asciiText, asciiTextLen, NX_READONLY);
}
}
return asciiStream;
}